package stdio.costa.imoca.card;

import stdio.costa.imoca.model.Image;
import stdio.costa.imoca.model.Preview;
import stdio.costa.imoca.utils.AsposeUtils;

public abstract class AbstractPreviewBuilder implements PreviewBuilder {

	protected AbstractPreviewBuilder() {
		AsposeUtils.loadLicense();
	}
	
	@Override
	public Preview build() throws Exception {
		Image front = createFront();
		Image back = createBack();
		return new Preview(front, back);
	}

	abstract protected Image createBack() throws Exception;

	abstract protected Image createFront() throws Exception;

}
